package it.unibo.refolding.pico;


public interface RefoldingNanoAdapter {

	/**
	 * We don't quit need a full PlainPicoData, but since it's so similar to fetch molecule
	 * it should be easy to obtain.
	 * 
	 * @param zScanStartM Double.NaN when unknown (the first time).
	 * @return never null, but fields will be null when things don't work
	 */
	PreviousAndCurrentLists breakAway(String prefix, String suffix);
	
	/**
	 * @param parkingM relative to the value at the initial breakAway call.
	 * @param prefix
	 * @return
	 */
	ParsedAndTargetFile fetchMolecule(double parkingM, String prefix, String suffix);
	
	PreviousAndCurrentLists refold(
		int velIndex,
		double parkingDeltaM, double refoldApproachRampSizeM, double refoldRetractionRampSizeM, double surfaceDelayS,
		String prefix, String suffix);
	
	NanoDriverConfig createRobotConfig(boolean forceRecord);

	/**
	 * A bit messy. We create the robot config ourselves, but we take the nano driver from
	 * someone else. Perhaps we should do both in here and hide the existence of a nano driver
	 * from the outside world.
	 * @param nanoDriver
	 */
	void setNanoDriver(NanoDriver nanoDriver);
	
	void xOffsetM(double newXOffsetM);
	
	void ping();

	/**
	 * @param refoldApproachRampSizeM
	 * @param refoldRetractionRampSizeM Only needed to check that previous files abide by this constraint.
	 * @param parkingDeltaM
	 * @param prefix
	 * @param suffix
	 * @return
	 */
	PreviousAndCurrentLists lose(
	  double refoldApproachRampSizeM, double refoldRetractionRampSizeM, double parkingDeltaM, String prefix, String suffix);
}
